<?php
defined('BY_JYA') or exit('error');
$_RQ['op']=$_RQ['op']?$_RQ['op']:'basic';
$return=array();
/*******basic*******/
if($_RQ['op']=='basic'){
	if($_RQ['postdata']){
		$postdata=get_postdata();
		$this->plugin_setting('basic',$postdata);
		exi('设置成功');
	}
	$footernav =array(
		array('title'=>'首页','icon'=>'icon-shouye','action'=>'jy_xiaofeelian/index/'),
		array('title'=>'搜索','icon'=>'icon-compass','action'=>'jy_xiaofeelian/search/'),
		array('title'=>'商户','icon'=>'icon-dianpu','action'=>'jy_xiaofeelian/merchlist/'),
		array('title'=>'我的','icon'=>'icon-wo1','action'=>'jy_xiaofeelian/myhome/'),
	);
	$hdps =array(
		array('title'=>'首页','picurl'=>'../addons/jy_xiaofeelian/resource/images/hdp.jpg','action'=>'index/'),
		array('title'=>'首页','picurl'=>'../addons/jy_xiaofeelian/resource/images/hdp01.jpg','action'=>'index/'),
	);
	$bankuai =array(
		array('title'=>'甜点饮品','icon'=>'icon-shipinyinliao','color'=>'#FF547B','showtype'=>'0','action'=>'jy_xiaofeelian/merchlist//isbankai=1'),
		array('title'=>'川湘菜','icon'=>'icon-chuancai','color'=>'#d62f35','showtype'=>'0','action'=>'jy_xiaofeelian/merchlist//isbankai=1'),
		array('title'=>'家常菜','icon'=>'icon-f13','color'=>'#fde24d','showtype'=>'0','action'=>'jy_xiaofeelian/merchlist//isbankai=1'),
		array('title'=>'面包蛋糕','icon'=>'icon-mianbao','color'=>'#FCC600','showtype'=>'0','action'=>'jy_xiaofeelian/merchlist//isbankai=1'),
		array('title'=>'包子粥铺','icon'=>'icon-baozi','color'=>'#cdab6a','showtype'=>'0','action'=>'jy_xiaofeelian/merchlist//isbankai=1'),
		array('title'=>'快食简餐','icon'=>'icon-kuaican','color'=>'#FCC600','showtype'=>'0','action'=>'jy_xiaofeelian/merchlist//isbankai=1'),
		array('title'=>'浪漫鲜花','icon'=>'icon-xianhua','color'=>'#FF4444','showtype'=>'0','action'=>'jy_xiaofeelian/merchlist//isbankai=1'),
		array('title'=>'正餐优选','icon'=>'icon-kuaicanyin','color'=>'#e1251b','showtype'=>'0','action'=>'jy_xiaofeelian/merchlist//isbankai=1'),
		array('title'=>'汉堡披萨','icon'=>'icon-hanbao','color'=>'#ffc350','showtype'=>'0','action'=>'jy_xiaofeelian/merchlist//isbankai=1'),
		array('title'=>'小吃馆','icon'=>'icon-xiaochic','color'=>'#fde24d','showtype'=>'0','action'=>'jy_xiaofeelian/merchlist//isbankai=1'),
	);
	$tags='很美味吃了还想吃|太好吃了，下次再来|不错，速度挺快的|是现炒的，味道可以|包装很高大上啊|够辣，够味|招牌菜不错，值得推荐|小孩子很喜欢吃，健康！';
	$item=$this->plugin_setting('basic');
	$item['tags']=$item['tags']?$item['tags']:$tags;
	$my_days = array(
			array('title'=>'我的优惠券','icon'=>'icon-youhuiquan','color'=>'#cc99ff','action'=>'jy_weishop/coupon.myindex/'),
			array('title'=>'微信会员卡','icon'=>'icon-daifahuo','color'=>'#cc99ff','action'=>'core/member.wxcard/main/'),
			array('title'=>'余额提现','icon'=>'icon-dixiaofei','color'=>'#cc99ff','action'=>'core/member.tixian/'),
			array('title'=>'地址管理','icon'=>'icon-position','color'=>'#cc99ff','action'=>'core/member.address/'),
			array('title'=>'帮助中心','icon'=>'icon-help','color'=>'#cc99ff','action'=>'jy_weishop/news.list/'),
			array('title'=>'获得购物卡','icon'=>'icon-qiangdan','color'=>'#cc99ff','action'=>'jy_weishop/member.getcard/'),
			array('title'=>'我的购物车','icon'=>'icon-gouwuche','color'=>'#cc99ff','action'=>'jy_weishop/member.cart/'),
			array('title'=>'我的购物卡','icon'=>'icon-pingzhengzhongxin','color'=>'#cc99ff','action'=>'jy_weishop/member.mycard/'),
			array('title'=>'我的关注','icon'=>'icon-woguanzhudepinpai','color'=>'#cc99ff','action'=>'jy_weishop/member.favorite/'),
			array('title'=>'我的足迹','icon'=>'icon-zuji','color'=>'#cc99ff','action'=>'jy_weishop/member.history/'),
	);
	$item['my_days'] = !empty($item['my_days']) ? $item['my_days'] : $my_days;
	$item['demomy_days'] = $my_days;
	$my_logs = array(
			array('title'=>'积分日志','icon'=>'icon-jifen','color'=>'#cc99ff','action'=>'core/member.credit_log/'),
			array('title'=>'余额日志','icon'=>'icon-jiangjiatongzhi','color'=>'#cc99ff','action'=>'core/member.credit_log/'),
			array('title'=>'提现日志','icon'=>'icon-trade','color'=>'#cc99ff','action'=>'core/member.cash_log/'),
			array('title'=>'红包日志','icon'=>'icon-ai-hongbao','color'=>'#cc99ff','action'=>'core/member.red_log/'),
	);
	$item['my_logs'] = !empty($item['my_logs']) ? $item['my_logs'] : $my_logs;
	$item['demomy_logs'] = $my_logs;
	$my_memberbtn = array(
			array('title'=>'小程序直播','icon'=>'icon-video','color'=>'#cc99ff','action'=>'jy_weishop/sale.live_index/'),
			array('title'=>'领取优惠券','icon'=>'icon-youhuiquan1','color'=>'#cc99ff','action'=>'jy_weishop/coupon.index/'),
			array('title'=>'领取微信会员卡','icon'=>'icon-huiyuanqia','color'=>'#cc99ff','action'=>'core/member.wxcard/main'),
			array('title'=>'积分排行','icon'=>'icon-paixing','color'=>'#cc99ff','action'=>'jy_weishop/member.rank/'),
			array('title'=>'商户入驻','icon'=>'icon-dianpu','color'=>'#cc99ff','action'=>'jy_merch/register/'),
	);
	$return['item']=$item;
	$return['item']['footernav']=$return['item']['footernav']?$return['item']['footernav']:$footernav;
	$return['item']['hdps']=$return['item']['hdps']?$return['item']['hdps']:$hdps;
	$return['item']['bankuai']=$return['item']['bankuai']?$return['item']['bankuai']:$bankuai;
	$htmls=array(
		'type'=>'edit',
		'desc'=>'参数设置',
		'edit_tab'=>true,
		'edits'=>array(
			array(
				'title'=>'基本信息',
				'list'=>array(
					array('type'=>'tip','title'=>'[<red>温馨提示</red>]：前端默认只显示本城市站的商户数据！'),
					array('type'=>'string','title'=>'网站名称','name'=>'title'),
					array('type'=>'image','title'=>'网站logo','name'=>'logo'),
					array('type'=>'switch','title'=>'显示所有商户','name'=>'is_nocity'),
					array('type'=>'switch','title'=>'单城市区域模式','name'=>'is_onecity'),
					array('type'=>'radio','title'=>'单城市区级别','name'=>'onetype','options'=>'onetypes','show'=>array('is_onecity'=>1)),
					array('type'=>'pcd','title'=>'设置城市区域','name'=>'onepcd','show'=>array('is_onecity'=>1)),
					array('type'=>'string','title'=>'默认城市','name'=>'city'),
					array('type'=>'text','title'=>'商户参考标签','name'=>'tags','help'=>'用|隔开，例如：很美味吃了还想吃|太好吃了，下次再来|不错，速度挺快的'),
					array('type'=>'text','title'=>'首页热门搜索','name'=>'searchkeyword','help'=>'用|隔开，例如：奶茶|炸鸡'),
					array('type'=>'image','title'=>'红包弹窗','name'=>'red_tan'),
					array('type'=>'switch','title'=>'开启小程序过审','name'=>'is_guoshen'),
					array('type'=>'link','from'=>'action','title'=>'小程序过审页面','name'=>'guoshen_url'),
					array('type'=>'string','title'=>'分享标题','name'=>'share_title'),
					array('type'=>'image','title'=>'分享图片','name'=>'share_image'),
					array('type'=>'string','title'=>'分享描述','name'=>'share_desc'),
				)
			),
			array(
					'title'=>'界面UI配色',
					'list'=>array(
						array('type'=>'color_pool','title'=>'选择配色方案','name'=>'syscolor','help'=>''),
						array('type'=>'colorpicker','title'=>'站点颜色','name'=>'syscolor','help'=>'自定义系统颜色系，默认： #18bc9c'),
						array('type'=>'phone_tpl','name'=>'syscolor'),
					)
			),
			array(
				'title'=>'幻灯片',
					'list'=>array(
						array(
							'type'=>'array',
							'name'=>'hdps',
							'add_tip'=>'添加一个幻灯片',
								'list'=>array(
									array('type'=>'image','name'=>'picurl','title'=>'幻灯片图片'),
									array('type'=>'string','name'=>'url','title'=>'幻灯片链接'),
									
								),
								'details'=>array(
									array('type'=>'image','name'=>'picurl','title'=>'幻灯片图片','help'=>''),
									array('type'=>'string','name'=>'url','title'=>'幻灯片链接'),
									
								)
						)
					)
			),
			array(
					'title'=>'欢迎幻灯片',
					'list'=>array(
								array('type'=>'switch','title'=>'开启欢迎页面','name'=>'iswelcome','help'=>'开启后，访问首页会先进入欢迎页面！'),
								array('type'=>'array','title'=>'欢迎幻灯片','name'=>'welcomehdps','add_tip'=>'添加一个欢迎幻灯片',
										'list'=>array(
											array('type'=>'string','name'=>'title','title'=>'标题'),
											array('type'=>'image','name'=>'picurl','title'=>'图片'),
											array('type'=>'string','name'=>'url','title'=>'地址'),
										),
										'details'=>array(
											array('type'=>'string','name'=>'title','title'=>'标题'),
											array('type'=>'string','name'=>'desc','title'=>'描述'),
											array('type'=>'image','name'=>'picurl','title'=>'图片','help'=>'推荐尺寸：750*900'),
											array('type'=>'link','name'=>'url','from'=>'action','title'=>'地址'),
										)
								),
					)
			),
			array(
				'title'=>'广告',
					'list'=>array(
						array('type'=>'image','name'=>'indexad','title'=>'首页广告'),
						array('type'=>'link','name'=>'indexadurl','from'=>'action','title'=>'首页广告链接'),
					)
			),
			array(
				'title'=>'板块',
					'list'=>array(
									array('type'=>'updemo','name'=>'bankuai','demo'=>'demobankuai','title'=>'重置导航','help'=>'不知道添加什么导航？重置默认的一下试试！'),
									array('type'=>'tip','title'=>'<red>[温馨提示]：这里是细分板块，可以把现有的商户分类划分到此板块！方便前端商户数据显示！</br>【首页附近商户不显示？】：目前首页附近商户显示的业务逻辑是跟美团一样的：是有时效性的（比如现在是早上，你看看哪个板块的特现时间是‘上午’的？然后编辑这个板块，里面添加一些希望早上要显示的商户分类，比如：包粥铺，早点等）</red>'),
									array('type'=>'array','name'=>'bankuai','add_tip'=>'添加一个板块导航',
									'list'=>array(
										array('type'=>'string','name'=>'title','title'=>'导航名称'),
										array('type'=>'image','name'=>'img','from'=>'jinyunicon','title'=>'导航图标'),
										array('type'=>'string','name'=>'action','title'=>'导航链接'),							
									),
									'details'=>array(
										array('type'=>'string','name'=>'title','title'=>'导航名称'),
										array('type'=>'image','name'=>'img','from'=>'jinyunicon','title'=>'导航图标'),									
										array('type'=>'link','name'=>'action','from'=>'action','title'=>'导航链接'),
									)
								),
					)
			),
			array(
				'title'=>'底部导航',
					'list'=>array(
									array('type'=>'array','name'=>'footernav','add_tip'=>'添加一个底部导航',
									'list'=>array(
										array('type'=>'string','name'=>'title','title'=>'导航名称'),
										array('type'=>'icon','name'=>'icon','from'=>'jinyunicon','title'=>'导航图标'),
										array('type'=>'string','name'=>'action','title'=>'导航链接'),							
									),
									'details'=>array(
										array('type'=>'string','name'=>'title','title'=>'导航名称'),
										array('type'=>'icon','name'=>'icon','from'=>'jinyunicon','title'=>'导航图标','help'=>'图标，例如：icon-shouye'),							
										array('type'=>'link','name'=>'action','from'=>'action','title'=>'导航链接'),
									)
								),
					)
			),
			array(
					'title'=>'页面开关设置',
					'list'=>array(
						array('type'=>'tip','title'=>'如需DIY会员中心页面：移步DIY装修--添加页面--页面类型--选择会员中心'),
						array('type'=>'switch','title'=>'是否支持线上购买商品?','name'=>'is_onlinebuy','isradio'=>1),
						array('type'=>'link','from'=>'action','title'=>'会员中心页面跳转','name'=>'home_url'),
						array('type'=>'switch','title'=>'关闭首页好店显示','name'=>'no_haodian'),
						array('type'=>'switch','title'=>'关闭我的订单','name'=>'no_order'),
						array('type'=>'switch','title'=>'关闭待激活商品','name'=>'no_verify'),
						array('type'=>'switch','title'=>'关闭我的日常','name'=>'no_days'),
						array('type'=>'switch','title'=>'关闭售后客服','name'=>'no_shkefu'),
						array('type'=>'switch','title'=>'不显示休息店铺','name'=>'no_offline'),
						array('type'=>'updemo','name'=>'my_days','demo'=>'demomy_days','title'=>'重置我的日常','help'=>'不知道添加什么我的日常？重置默认的一下试试！'),
						array('type'=>'array','title'=>'我的日常','name'=>'my_days','add_tip'=>'添加一个我的日常',
									'list'=>array(
										array('type'=>'string','name'=>'title','title'=>'日常名称'),
										array('type'=>'icon','name'=>'icon','from'=>'jinyunicon','title'=>'日常图标'),
										array('type'=>'string','name'=>'action','title'=>'日常链接'),
									),
									'details'=>array(
										array('type'=>'string','name'=>'title','title'=>'日常名称'),
										array('type'=>'icon','name'=>'icon','from'=>'jinyunicon','title'=>'日常图标'),
										array('type'=>'link','name'=>'action','from'=>'action','title'=>'日常链接'),
									)
						),
						array('type'=>'switch','title'=>'关闭我的记录','name'=>'no_logs'),
						array('type'=>'updemo','name'=>'my_logs','demo'=>'demomy_logs','title'=>'重置我的记录','help'=>'不知道添加什么我的记录？重置默认的一下试试！'),
						array('type'=>'array','title'=>'我的记录','name'=>'my_logs','add_tip'=>'添加一个我的记录',
									'list'=>array(
										array('type'=>'string','name'=>'title','title'=>'记录名称'),
										array('type'=>'icon','name'=>'icon','from'=>'jinyunicon','title'=>'记录图标'),
										array('type'=>'string','name'=>'action','title'=>'记录链接'),
									),
									'details'=>array(
										array('type'=>'string','name'=>'title','title'=>'记录名称'),
										array('type'=>'icon','name'=>'icon','from'=>'jinyunicon','title'=>'记录图标'),
										array('type'=>'link','name'=>'action','from'=>'action','title'=>'记录链接'),
									)
						),
						array('type'=>'tip','title'=>'其他导航列表'),
						array('type'=>'switch','title'=>'关闭其他导航','name'=>'no_others'),
						array('type'=>'updemo','name'=>'my_memberbtn','demo'=>'demomy_memberbtn','title'=>'重置导航','help'=>'不知道添加什么导航？重置默认的一下试试！'),
						array('type'=>'array','title'=>'其他导航','name'=>'my_memberbtn','add_tip'=>'添加一个导航按钮',
									'list'=>array(
										array('type'=>'string','name'=>'title','title'=>'导航名称'),
										array('type'=>'icon','name'=>'icon','from'=>'jinyunicon','title'=>'导航图标'),
										array('type'=>'string','name'=>'action','title'=>'导航链接'),
									),
									'details'=>array(
										array('type'=>'string','name'=>'title','title'=>'导航名称'),
										array('type'=>'icon','name'=>'icon','from'=>'jinyunicon','title'=>'导航图标'),
										array('type'=>'link','name'=>'action','from'=>'action','title'=>'导航链接'),
									)
						),
					)
			),
		),
	);
	$return['onetypes']=array('城市','区/县');
	$return['htmls']=$htmls;
	exi($return);
}
/*******basic*******/
/*******op*******/
